package com.bw.module_cinema.model.api

import com.bw.lib_net.NetModule
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import retrofit2.Retrofit
import javax.inject.Singleton

@Module
@InstallIn(SingletonComponent::class)
class NetModule {
    /**
     * 提供CinemaApi实例
     */
    @Provides
    @Singleton
    fun getCinemaApi(@NetModule.CommonRetrofit retrofit: Retrofit):CinemaApi{
        return retrofit.create(CinemaApi::class.java)
    }
}